<?php

namespace app\middleware;

use app\common\library\Shaper as ShaperLibrary;

class Shaper
{
    public function handle($request, \Closure $next)
    {
        $model = new ShaperLibrary(container: 'container');
        if (!$model->get()) {
            return json(result()->fail(result()::REQUEST_FREQUENT));
        }
        return $next($request);
    }
}